package com.example.aop.redis.controller;

import com.example.aop.redis.aop.RepeatSubmit;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * @author: 船长
 * @create: 2024-06-28 21:20
 **/

@RestController
@RequestMapping("/test")
public class TestController {

    @GetMapping("/hello")
    @RepeatSubmit(lockedTime = 5, timeUnit = TimeUnit.SECONDS)
    public String hello(){
        return "hello";
    }

}
